GBML manual / Collision

slope_feet

Chooses how the whole game’s movers meet slopes: true, they stand on their feet (a platformer: the bottom middle of the body rests on the slope and the body walks up and down it); false, the whole body meets the slope (a top-down game: a body pushed into a diagonal wall slides along it).

Syntax

slope_feet(on)

Arguments

NameType
onbool

Returns

Nothing.

Description

Chooses how every body in the game meets a slope.

It covers every object that moves with move_slide or move_slide_solid, and every tile_free question, in every room, until it is called again.

You usually do not call it

The Player movement tab decides for you when the project is built: feet on when the game has a platformer or an auto-runner, off when its designs are all top-down, grid, ship or spin, and on when there are no designs. Call slope_feet once, in a Create event, only to choose differently: a top-down game with a platformer room, or a platformer that you moved by hand.

It changes nothing in a room with no slope.

Example

slope_feet(false);

Makes every body a whole box that slides along diagonal walls, for a game that has no ground.

On the GBA

The Player movement designs set it for you when the project is built: on for a game with a platformer or an auto-runner, off for a game whose designs are all top-down, grid, ship or spin, and on when there are no designs. Call this only to choose differently, once, in a Create event. It covers every object that moves with move_slide, move_slide_solid or tile_free, in every room, until it is called again. It changes nothing in a room with no slope.

See also: Slopesmove_slidetile_freetile_shape